﻿#include "FITKAbsGeoModelOperFace.h"
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractModel.h"

namespace Interface
{
    void FITKAbsGeoModelOperFace::add(VirtualShape geoCommandShape)
    {
        m_tempVShapes.append(geoCommandShape);
    }

    void FITKAbsGeoModelOperFace::add(QList<VirtualShape> geoCommandShapes)
    {
        m_tempVShapes.append(geoCommandShapes);
    }

    void FITKAbsGeoModelOperFace::set(VirtualShape geoCommandShape)
    {
        m_tempVShapes.clear();
        m_tempVShapes.append(geoCommandShape);
    }

    void FITKAbsGeoModelOperFace::set(QList<VirtualShape> geoCommandShapes)
    {
        m_tempVShapes = geoCommandShapes;
    }


    void FITKAbsGeoModelOperFace::remove(int index)
    {
        m_tempVShapes.removeAt(index);
    }

    void FITKAbsGeoModelOperFace::clear()
    {
        m_tempVShapes.clear();
    }

    void FITKAbsGeoModelOperFace::setType(GeoFaceOperType t)
    {
        _faceOperType = t;
    }

    FITKAbsGeoModelOperFace::GeoFaceOperType FITKAbsGeoModelOperFace::getType()
    {
        return _faceOperType;
    }

    QList<VirtualShape> FITKAbsGeoModelOperFace::getVShapes()
    {
        return m_tempVShapes;
    }

    QList<int> FITKAbsGeoModelOperFace::getModelOperFacesID()
    {
        QList<int> _geoCommands;

        for (int i = 0; i < m_tempVShapes.size(); i++)
        {
            _geoCommands.append(m_tempVShapes[i].CmdId);
        }
        return _geoCommands;
    }

    void FITKAbsGeoModelOperFace::setTolerance(double tolerance)
    {
        _tolerance = tolerance;
    }

    double FITKAbsGeoModelOperFace::getTolerance()
    {
        return _tolerance;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelOperFaceFillGaps::getGeometryCommandType()
    {
        return FITKGeoEnum::FITKGeometryComType::FGTFillGapsFace;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelOperFaceFillHoles::getGeometryCommandType()
    {
        return FITKGeoEnum::FITKGeometryComType::FGTFillHolesFace;
    }

    FITKGeoEnum::FITKGeometryComType FITKAbsGeoModelOperFaceDeleteFloatingEdge::getGeometryCommandType()
    {
        return FITKGeoEnum::FITKGeometryComType::FGTDeleteFloatingEdge;
    }

    void FITKAbsGeoModelOperFaceDeleteFloatingEdge::setMFace(VirtualShape vface)
    {
        m_face = vface;
    }
    VirtualShape FITKAbsGeoModelOperFaceDeleteFloatingEdge::getMFace()
    {
        return m_face;
    }
}